// HahaClockDlg.h : header file
//

#if !defined(AFX_HAHACLOCKDLG_H__3FF6BF21_260F_4BC6_BC80_2AC3915F1D4D__INCLUDED_)
#define AFX_HAHACLOCKDLG_H__3FF6BF21_260F_4BC6_BC80_2AC3915F1D4D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CHahaClockDlg dialog

typedef struct 
{
	int nHour;
	int nMinute;
	int nSecond;
}HahaClockStruct;
class CHahaClockDlg : public CDialog, public CFlySetup
{
// Construction
public:
	BOOL ImageFromIDResource(UINT nID,LPCTSTR sTR,Image * &pImg);
	BOOL UpdateClockDisplay(int Transparent=255);
	CHahaClockDlg(CWnd* pParent = NULL);	// standard constructor
	void HahaBegin(int hour, int minute, int second);
	void HahaCheck(int second);
	void HahaTime(int hour, int minute, int second);
	int RandomSetHaHaUBounder(int low, int high, int seed);
	void Fly(void);

	CSetupDlg m_ctlSetupDlg;

	BLENDFUNCTION m_stBlend;
	HDC m_hdcMemory;
	Image *m_pImageClock;
	Image *m_pImageClock1;
	Image *m_pImageHHour;
	Image *m_pImageHMinu;
	Image *m_pImageHSec;
	Image *m_pImageNum;
	int m_nBakWidth, m_nBakHeight;
	int m_nHourWidth, m_nHourHeight;
	int m_nMinuWidth, m_nMinuHeight;
	int m_nSecWidth, m_nSecHeight;
	HINSTANCE hFuncInst ;
	typedef BOOL (WINAPI *MYFUNC)(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,BLENDFUNCTION*,DWORD);          
	MYFUNC UpdateLayeredWindow;
	HahaClockStruct m_stHahaClock;
// Dialog Data
	//{{AFX_DATA(CHahaClockDlg)
	enum { IDD = IDD_HAHACLOCK_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHahaClockDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	afx_msg void OnContextMenu(CWnd*, CPoint point);
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CHahaClockDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnDestroy();
	afx_msg void OnExit();
	afx_msg void OnReset();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnSet();
	afx_msg void OnHeip();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_HAHACLOCKDLG_H__3FF6BF21_260F_4BC6_BC80_2AC3915F1D4D__INCLUDED_)
